package com.iqiyi.pps.epg.core.dao.program;

import com.iqiyi.pps.epg.core.dao.base.HibernateDao;
import com.iqiyi.pps.epg.core.model.program.ProgramDirectorResource;
import org.springframework.stereotype.Component;
import com.iqiyi.pps.epg.core.dao.base.PropertyFilter;
import org.hibernate.Criteria;
import org.hibernate.criterion.Criterion;

import java.util.List;

/**
 * Created by zhangjing on 2017/3/13.
 */
@Component
public class ProgramDirectorResourceDao extends HibernateDao<ProgramDirectorResource, Integer> {
    public List<ProgramDirectorResource> find(List<PropertyFilter> filters) {
        Criterion[] criterions = buildCriterionByPropertyFilter(filters);
        Criteria criteria = createCriteria(criterions);
        return criteria.list();
    }
}
